﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="RichTextBox.aspx.cs" Inherits="DutyWeb.RichTextBox" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">

    <script language="javascript">
        function checkDel(str)
        {
            if(!confirm("确认删除 "+str+" 吗？"))
                return(false);
        }
    </script>

</head>
<body>
    <form id="form2" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <div>
        <asp:GridView ID="myGridView" runat="server" AutoGenerateColumns="False" AllowPaging="False"
            PageSize="15" AllowSorting="True" HorizontalAlign="Center" AutoGenerateDeleteButton="False"
            AutoGenerateEditButton="True" Width="772px" DataKeyNames="ID" CellPadding="4"
            ForeColor="#333333" GridLines="None" OnRowCancelingEdit="myGridView_RowCancelingEdit"
            OnRowUpdating="myGridView_RowUpdating" OnRowDeleting="myGridView_RowDeleting"
            OnRowEditing="myGridView_RowEditing" OnDataBound="myGridView_DataBound">
            <PagerStyle HorizontalAlign="Center" ForeColor="White" BackColor="#284775" />
            <Columns>
                <asp:TemplateField HeaderText="编号">
                    <ItemTemplate>
                        <asp:Label ID="LabRowNo" runat="server" Text='<%# (Container.DisplayIndex+1).ToString() %>'></asp:Label>
                        <asp:Label ID="LabID" runat="server" Text='<%# Eval("ID") %>'></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="条目名称">
                    <ItemTemplate>
                        <asp:Label ID="LabFinantialItemName" runat="server" Text='<%# Eval("DeviceID") %>'></asp:Label>
                    </ItemTemplate>
                    <EditItemTemplate>
                        <asp:DropDownList runat="server" ID="dplFinanceItemsName">
                        </asp:DropDownList>
                    </EditItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="日期">
                    <ItemTemplate>
                        <asp:Label ID="LabOccuredDate" runat="server" Text='<%# Eval("OccuredDate") %>'></asp:Label>
                    </ItemTemplate>
                    <EditItemTemplate>
                        <asp:TextBox ID="txtOccuredDate" runat="server" Text='<%# Eval("OccuredDate") %>'
                            Width="100px"></asp:TextBox><cc1:CalendarExtender ID="CalendarExtender1" TargetControlID="txtOccuredDate"
                                runat="server" Format="yyyy-MM-dd">
                            </cc1:CalendarExtender>
                    </EditItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="人员">
                    <ItemTemplate>
                        <asp:Label ID="LabPersonName" runat="server" Text='<%# Eval("PersonName") %>'></asp:Label>
                    </ItemTemplate>
                    <EditItemTemplate>
                        <asp:TextBox ID="txtPersonName" Width="100px" runat="server" Text='<%# Eval("PersonName") %>'></asp:TextBox>
                    </EditItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="天数">
                    <ItemTemplate>
                        <asp:Label ID="LabDateOfDuration" runat="server" Text='<%# Eval("DateOfDuration") %>'></asp:Label>
                    </ItemTemplate>
                    <EditItemTemplate>
                        <asp:TextBox ID="txtDateOfDuration" Width="100px" runat="server" Text='<%# Eval("DateOfDuration") %>'></asp:TextBox>
                    </EditItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="金额">
                    <ItemTemplate>
                        <asp:Label ID="LabMoneyAmount" runat="server" Text='<%# Eval("MoneyAmount") %>'></asp:Label>
                    </ItemTemplate>
                    <EditItemTemplate>
                        <asp:TextBox ID="txtMoneyAmount" Width="100px" runat="server" Text='<%# Eval("MoneyAmount") %>'></asp:TextBox>
                    </EditItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="申请理由">
                    <ItemTemplate>
                        <asp:Label ID="LabApplyReason" runat="server" Text='<%# Eval("ApplyReason") %>'></asp:Label>
                    </ItemTemplate>
                    <EditItemTemplate>
                        <asp:TextBox ID="txtApplyReason" Width="100px" runat="server" Text='<%# Eval("ApplyReason") %>'></asp:TextBox>
                    </EditItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="描述">
                    <ItemTemplate>
                        <asp:Label ID="showDescribe" runat="server" Text='<%# Eval("Description") %>'></asp:Label>
                    </ItemTemplate>
                    <EditItemTemplate>
                        <asp:TextBox ID="txtDescribe" Width="100px" runat="server" Text='<%# Eval("Description") %>'></asp:TextBox>
                    </EditItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField ShowHeader="False">
                    <ItemTemplate>
                        <asp:LinkButton ID="txtDel" runat="server" CausesValidation="False" CommandArgument='<%# Eval("ID") %>'
                            OnClick="txtDel_Click" Text="删除"></asp:LinkButton>
                    </ItemTemplate>
                </asp:TemplateField>
            </Columns>
            <%--<PagerSettings FirstPageText="第一页" LastPageText="最末页" NextPageText="下一页" PreviousPageText="上一页" />--%>
            <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
            <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
            <EditRowStyle BackColor="#999999" />
            <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
            <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
            <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
        </asp:GridView>
        <center>
            <asp:Button ID="BtAdd" runat="server" Text="新增" OnClick="BtAdd_Click" />
            <asp:Button ID="BtSave" runat="server" Text="保存" OnClick="BtSave_Click" /></center>
    </div>
    <cc1:TabContainer ID="TabContainer1" runat="server" Height="57px" Width="500" ActiveTabIndex="1">
        <cc1:TabPanel ID="TabPanel1" runat="server" HeaderText="爱吃的水果">
            <ContentTemplate>
                <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                    <ContentTemplate>
                        <asp:Button runat="server" ID="Button2" Text="水果" OnClick="btnSubmit_Click" />
                    </ContentTemplate>
                </asp:UpdatePanel>
            </ContentTemplate>
        </cc1:TabPanel>
        <cc1:TabPanel ID="TabPanel2" runat="server" HeaderText="喜欢的东西">
            <ContentTemplate>
                <asp:UpdatePanel ID="UpdatePanel2" runat="server">
                    <ContentTemplate>
                        <asp:Button runat="server" ID="btnSubmit" Text="东西" OnClick="btnSubmit_Click" />
                    </ContentTemplate>
                </asp:UpdatePanel>
            </ContentTemplate>
        </cc1:TabPanel>
        <cc1:TabPanel ID="TabPanel3" runat="server" HeaderText="喜欢的音乐">
            <ContentTemplate>
                <asp:UpdatePanel ID="UpdatePanel3" runat="server">
                    <ContentTemplate>
                        <asp:Button runat="server" ID="Button1" Text="音乐" OnClick="btnSubmit_Click" />
                    </ContentTemplate>
                </asp:UpdatePanel>
            </ContentTemplate>
        </cc1:TabPanel>
    </cc1:TabContainer>
    </form>
</body>
</html>
